<template>
   <nut-cell title="训练记录" ></nut-cell>

    <nut-cell-group 
        v-for="his of train_history"
        :key ="his.time"
        :title="his.time"
    >
        <nut-cell title="课程:" >
            <text 
                class="course"
                v-for="course of his.courses"
                :key = "course"
            >{{course}}</text>
        </nut-cell>

    </nut-cell-group>
</template>

<script lang="ts">
import { TRAIN_HISTORY_KEY } from "../../utils/constant";
import { defineComponent } from "vue";
import Taro from "@tarojs/taro";

import "./index.less"
export default defineComponent({
    setup() {
        const train_history = Taro.getStorageSync(TRAIN_HISTORY_KEY);
        console.log("训练记录---",  train_history);
        
        return {
            train_history
        };
    },
});
</script>


